package test;

import java.util.Scanner;

/*
 *@Author: zdg
 *@Date：2022/3/16 14:20
 *@Description:
 */
//10分)3：
//输入一个正整数，获得他去掉最高位后的数，比如输入123，则结果是23；输入1000结果是0，输入25结果是5，输入9结果是0.
public class Cs3 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int num = sc.nextInt();
        int finalNum = 0;
        int digit = 0;
        while (num / 10 != 0) {
            int mul = (int) Math.pow(10, digit);
            finalNum = (num % 10) * mul + finalNum;
            num = num / 10;
            digit++;
        }
        System.out.println(finalNum);
    }
}

